/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.moravian.UI;

import edu.moravian.math.Point2D;
import edu.moravian.player.PlayerInfo;
import edu.moravian.world.World2D;
import edu.moravian.world.WorldDescriptor;
import java.awt.Color;
import java.text.DecimalFormat;
import java.text.Format;

/**
 *
 * @author ronaghan
 */
public class GameInfoView extends GameView
{
    private final Point2D titleTextLoc = new Point2D(this.boundsDescriptor.getCenter().getX(), this.boundsDescriptor.getMaxY() - 20);
    private final Point2D moniesTextLoc = new Point2D(this.boundsDescriptor.getCenter().getX(), this.boundsDescriptor.getMaxY() - 40);
    private final Point2D livesTextLoc = new Point2D(this.boundsDescriptor.getCenter().getX(), this.boundsDescriptor.getMaxY() - 60);
    private final Point2D waveTextLoc = new Point2D(this.boundsDescriptor.getCenter().getX(), this.boundsDescriptor.getMaxY() - 80);
    private final Point2D killedTextLoc = new Point2D(this.boundsDescriptor.getCenter().getX(), this.boundsDescriptor.getMaxY() - 100);

    
    
    public GameInfoView(WorldDescriptor boundsDescriptor, PlayerInfo playerInfo)
    {
        super(boundsDescriptor);
    }

    public void draw(World2D w2d)
    {
        //w2d.setColor(Color.BLUE);
        w2d.setColor(new Color(25, 25, 112));
        w2d.setOpacity(0.75f);
        w2d.drawCenteredRectangle(boundsDescriptor.getCenter(), boundsDescriptor.getWidth()-2, boundsDescriptor.getHeight()-2);
        w2d.setOpacity(1.0f);

        
        w2d.setColor(Color.WHITE);
        w2d.drawTopCenteredString("TOWER DEFENSE", titleTextLoc);
        w2d.drawTopCenteredString("MONIES: " + PlayerInfo.getMonies(), moniesTextLoc);
        w2d.drawTopCenteredString("LIVES : " + PlayerInfo.getLivesRemaining(), livesTextLoc);
        w2d.drawTopCenteredString("Cur Wave: " + PlayerInfo.getWave(), waveTextLoc);
        w2d.drawTopCenteredString("Enemies Killed: " + PlayerInfo.getEnemiesKilled(), killedTextLoc);

    }

    public void handleMouseClick(Point2D location)
    {
        //do nothing for mouse clicks here
    }

    @Override
    public void handleMouseMoved(Point2D location)
    {
       // throw new UnsupportedOperationException("Not supported yet.");
    }
}
